package com.easyJava.utils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class LocalDateUtils {
    public final static String YYYY_MM_DD = "yyyy-MM-dd";


    public static String format(String pattern, LocalDate date){
        return DateTimeFormatter.ofPattern(pattern).format(date);
    }

    public static LocalDate parse(String pattern, String dateTime){
        return LocalDate.parse(dateTime, DateTimeFormatter.ofPattern(pattern));
    }
}
